﻿using System;
using System.Collections.Generic;
using System.Xml.Serialization;

namespace Songhay.Models
{
    /// <summary>
    /// Defines a managed representation of the OPML outline element.
    /// </summary>
#if !SILVERLIGHT
    [Serializable]
#endif
    [XmlRoot(ElementName = "outline")]
    public class OpmlOutline
    {
        /// <summary>
        /// Gets or sets the Category.
        /// </summary>
        /// <value>The ID.</value>
        [XmlAttribute(AttributeName = "category")]
        public string Category { get; set; }

        /// <summary>
        /// Gets or sets the ID.
        /// </summary>
        /// <value>The ID.</value>
        [XmlAttribute(AttributeName = "id")]
        public string ID { get; set; }

        /// <summary>
        /// Gets or sets the outlines.
        /// </summary>
        /// <value>The outlines.</value>
        [XmlElement(ElementName = "outline")]
        public OpmlOutline[] Outlines { get; set; }

        /// <summary>
        /// Gets or sets the text.
        /// </summary>
        /// <value>The text.</value>
        [XmlAttribute(AttributeName = "text")]
        public string Text { get; set; }

        /// <summary>
        /// Gets or sets the title.
        /// </summary>
        /// <value>The title.</value>
        [XmlAttribute(AttributeName = "title")]
        public string Title { get; set; }

        /// <summary>
        /// Gets or sets the type.
        /// </summary>
        /// <value>The type.</value>
        [XmlAttribute(AttributeName = "type")]
        public string Type { get; set; }

        /// <summary>
        /// Gets or sets the URL.
        /// </summary>
        /// <value>The URL.</value>
        [XmlAttribute(AttributeName = "url")]
        public string Url { get; set; }

        /// <summary>
        /// Gets or sets the XML URL.
        /// </summary>
        /// <value>The XML URL.</value>
        [XmlAttribute(AttributeName = "xmlUrl")]
        public string XmlUrl { get; set; }
    }
}
